According to the Advanced Video Coding (AVC) standard ISO/IEC 14496-10, or MPEG-4 part 10, or H.264, the encoding may select between inter and intra coding for pixel blocks in the pictures. Inter coding uses motion vectors for block-based inter prediction between different pictures. Intra coding uses spatial predictions within a picture to exploit spatial statistical dependencies in the source signal. Motion vectors and intra prediction modes are specified for differing block sizes. The prediction residual is further compressed using a transform to remove spatial correlation inside the transform block before it is quantised. Finally, the motion vector information or the intra prediction mode information is combined with the quantised transform coefficient information and is encoded using either variable length codes or arithmetic coding.
A macroblock, consisting of a 16*16 block of luma samples and two corresponding blocks of chroma samples, is used as the basic processing unit of the video decoding process. For inter prediction a macroblock can be further partitioned down to blocks of 4*4 luma samples in size, whereby the selected size of inter prediction partitions is a trade-off between the coding gain provided by using motion compensation with smaller blocks and the quantity of data needed to represent the data for motion compensation. Motion vectors are encoded differentially with respect to predicted values formed from nearby encoded motion vectors. After inter prediction from previously decoded samples in other pictures or spatial-based prediction from previously decoded samples within the current picture, the resulting prediction residual is split into 4*4 blocks, which are converted into the transform domain where they are quantised.
The spatial intra-prediction for luminance pixel blocks (luma blocks) is based on 4*4 blocks. Intra prediction can be carried out for I and SI type macroblocks. Inputs to this process are associated values of reconstructed samples (prior to a deblocking filter operation) from adjacent luma blocks of the corresponding neighbour macroblock or from adjacent 4*4 luma blocks of the current macroblock. Outputs of this process are 4*4 luma sample arrays that are part of the 16*16 luma array of prediction samples of the macroblock.
Nine different intra prediction modes are available in AVC encoding and decoding: prediction in 8 different spatial directions and a mode denoted ‘Intra—4×4_DC prediction mode’. However, intra prediction modes for neighbouring 4*4 blocks are often correlated. In order to save bits for signalling the prediction mode to be used for a current 4*4 block, a ‘prev_intra4×4_pred_mode’ flag and a 3-bit parameter ‘rem_intra4×4_pred_mode’ are used. If this flag is set, the ‘most probable prediction mode’ is used by the encoder and the decoder. If the flag is ‘0’, rem_intra4×4_pred_mode is sent to indicate a change of mode (independent mode select). If rem_intra4×4_pred_mode is smaller than the current ‘most probable prediction mode’ then the prediction mode is set to rem_intra4×4_pred_mode, otherwise the prediction mode is set to (rem_intra4×4_pred_mode+1). In this way, only eight values of rem_intra4×4_pred_mode are required to signal the current one of the nine intra modes. The ‘most probable prediction diction mode’ means the minimum mode number of the prediction mode numbers for the 4*4 block to the left of the current 4*4 block and for the 4*4 block top of the current 4*4 block, respectively. If either of these neighbouring blocks is not available for prediction e.g. because it is not coded in Intra4×4 mode, to the current 4*4 block the ‘Intra—4×4_DC prediction mode’ is assigned.